/**
 * jims
 */
package com.jims.master.modules.blood.web;

import com.jims.master.common.persistence.Page;
import com.jims.master.common.web.BaseController;
import com.jims.master.modules.blood.service.UseBloodInfoVoService;
import com.jims.master.modules.blood.vo.UseBloodInfoVo;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * 患者用血情况查询Controller
 * @author fengyg
 * @version 2017-04-17
 */
@Controller
@RequestMapping(value = "${adminPath}/blood/useBloodInfo")
public class UseBloodInfoController extends BaseController {

	@Autowired
	private UseBloodInfoVoService useBloodInfoVoService;

    /**
     * 患者用血情况查询
     * @param useBloodInfoVo
     * @param request
     * @param response
     * @param model
     * @return
     * @author fengyg
     */
	@RequiresPermissions("user")
	@RequestMapping(value = {"index", ""})
	public String list(UseBloodInfoVo useBloodInfoVo, HttpServletRequest request, HttpServletResponse response, Model model) {
        Page<UseBloodInfoVo> page = useBloodInfoVoService.findPage(new Page<UseBloodInfoVo>(request, response), useBloodInfoVo);
        model.addAttribute("page", page);
		return "modules/blood/useBloodInfo";
	}
}